package ex6;

public  class  Sin extends Function implements Ifun {

    public Sin() {
    }

    public Sin(String name, double a) {
        super(name, a);
    }

    @Override
    public void getValue() {
        double a = Math.toRadians(super.getA());//将数字转化为角度
        System.out.println(super.getName()+((int)super.getA())+"="+Math.sin(a));//相当于输出sin(角度)
    }
}
